luci-base: add getPending ubus function call
authorFlorian Eckert <[email protected]>
Tue, 7 Oct 2025 08:43:14 +0000 (10:43 +0200)
committerFlorian Eckert <[email protected]>
Fri, 10 Oct 2025 12:08:24 +0000 (14:08 +0200)
Exporting the ubus “pending” information so that this information can be
used in LuCI.

Signed-off-by: Florian Eckert <[email protected]>
modules/luci-base/htdocs/luci-static/resources/network.js

index 43dded3295812a0fe8fe9803c4e9e2c0abdc3f9d..7ce3e44c5268044867c6d91b3cf5958f3fcafc64 100644 (file)
@@ -2560,6 +2560,16 @@ Protocol = baseclass.extend(/** @lends LuCI.network.Protocol.prototype */ {
                return (this._ubus('dynamic') == true);
        },
 
+       /**
+        * Checks whether this logical interface is pending.
+        *
+        * @returns {boolean}
+        * returns `true` when the interface is pending or `false` when it is not.
+        */
+       isPending: function() {
+               return (this._ubus('pending') == true);
+       },
+
        /**
         * Checks whether this interface is an alias interface.
         *